package com.marktotop.entity.business;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * <p>
 *      供应商
 * </p>
 *
 * @author MarkToTop
 * @since 2021-07-12
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("biz_supplier")
@ApiModel(value="Supplier对象", description="")
public class Supplier implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "供应商名称")
    private String name;

    @ApiModelProperty(value = "供应商所属区域")
    private String area;

    @ApiModelProperty(value = "详细地址")
    private String address;

    @ApiModelProperty(value = "供应商邮箱")
    private String email;

    @ApiModelProperty(value = "供应商电话")
    @NotBlank(message = "电话不能为空")
    private String phone;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @ApiModelProperty(value = "修改时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date modifiedTime;

    @ApiModelProperty(value = "排序")
    @NotNull(message = "排序号不能为空")
    private Integer sort;

    @ApiModelProperty(value = "联系人ID")
    private Long contactId;

    @ApiModelProperty(value = "联系人姓名")
    @TableField(exist = false)
    private String nickName;

    @ApiModelProperty(value = "联系人电话号码")
    @TableField(exist = false)
    private String phoneNumber;

    @ApiModelProperty(value = "联系人所在部门")
    @TableField(exist = false)
    private String departmentName;

}
